package com.bobo.servicestorage.controller;

import com.bobo.servicestorage.dao.TbServiceStorageDao;
import com.bobo.servicestorage.entry.TbServiceStorage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bobo
 * @date 2021-04-09
 */
@RestController
public class StorageController {

    @Autowired
    private TbServiceStorageDao tbServiceStorageDao;

    @GetMapping("/storage")
    public String storage() {
        TbServiceStorage tbServiceStorage = new TbServiceStorage();
        tbServiceStorage.setId(1);
        tbServiceStorage.setName("库存1");
        tbServiceStorageDao.insert(tbServiceStorage);
        int i = 1 / 0;
        return "success";
    }
}
